<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('小程序列表列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>微信小程序id：</label>
                                <input type="text" name="id"/>
                            </li>
                            <li>
                                <label>应用类型(1餐饮 2商城)：</label>
                                <select name="appType">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <li>
                                <label>门店模式：</label>
                                <input type="text" name="shopMode"/>
                            </li>
                            <li>
                                <label>账号来源，1=自助注册，2=平台注册：</label>
                                <input type="text" name="source"/>
                            </li>
                            <li>
                                <label>是否授权(0否 1是)：</label>
                                <input type="text" name="isEmpower"/>
                            </li>
                            <li>
                                <label>小程序名称：</label>
                                <input type="text" name="appName"/>
                            </li>
                            <li>
                                <label>小程序AppID：</label>
                                <input type="text" name="appId"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="smdd:xcxlb:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="smdd:xcxlb:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="smdd:xcxlb:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="smdd:xcxlb:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('smdd:xcxlb:edit')}]];
        var removeFlag = [[${@permission.hasPermi('smdd:xcxlb:remove')}]];
        var prefix = ctx + "smdd/xcxlb";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "小程序列表",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '微信小程序id',
                    visible: false
                },
                {
                    field: 'appType',
                    title: '应用类型(1餐饮 2商城)'
                },
                {
                    field: 'shopMode',
                    title: '门店模式'
                },
                {
                    field: 'source',
                    title: '账号来源，1=自助注册，2=平台注册'
                },
                {
                    field: 'isEmpower',
                    title: '是否授权(0否 1是)'
                },
                {
                    field: 'appName',
                    title: '小程序名称'
                },
                {
                    field: 'headImg',
                    title: '小程序头像'
                },
                {
                    field: 'userName',
                    title: '原始ID'
                },
                {
                    field: 'appId',
                    title: '小程序AppID'
                },
                {
                    field: 'principalName',
                    title: '主体名称'
                },
                {
                    field: 'apiDomain',
                    title: '服务器域名'
                },
                {
                    field: 'signature',
                    title: '功能介绍'
                },
                {
                    field: 'mchid',
                    title: '微信商户号id'
                },
                {
                    field: 'apikey',
                    title: '微信支付密钥'
                },
                {
                    field: 'certPem',
                    title: '微信支付证书'
                },
                {
                    field: 'keyPem',
                    title: '微信支付证书'
                },
                {
                    field: 'isCollection',
                    title: '收藏提醒(0关闭 1开启)'
                },
                {
                    field: 'isWechat',
                    title: '关注公众号提醒(0关闭 1开启)'
                },
                {
                    field: 'phone',
                    title: '商家客服电话'
                },
                {
                    field: 'accessToken',
                    title: '令牌凭证'
                },
                {
                    field: 'expiresIn',
                    title: '令牌到期时间'
                },
                {
                    field: 'authorizerRefreshToken',
                    title: '刷新令牌'
                },
                {
                    field: 'template',
                    title: '模板ID'
                },
                {
                    field: 'isCopyright',
                    title: '自定义版权(0关闭 1开启)'
                },
                {
                    field: 'copyright',
                    title: '小程序底部版权'
                },
                {
                    field: 'storeUserId',
                    title: '商户ID'
                },
                {
                    field: 'expireTime',
                    title: '小程序到期时间'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>